<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			.slide{position:relative;width: 320px;height: 480px;}
			.slide img{width: 100%;height: 100%;}
		</style>
	</head>
	<body>
		<div class="slide">
			<img src="./images/1.jpg" id="img">
		</div>
		<script type="text/javascript">
			var img = document.getElementById('img');
			var i = 1;
			setInterval(function(){
				if(i > 3){
					i = 1;
				}
				img.src = './images/'+i+++'.jpg';
			},2000);
		</script>
	</body>
</html>